# Copyright 2020-2021 Fugue, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
package tests.examples.aws.inputs.tag_all_resources_infra_json

import data.fugue.resource_view.resource_view_input

mock_input := ret {
  ret = resource_view_input with input as mock_config
}
mock_resources := mock_input.resources
mock_config := {
  "configuration": {
    "provider_config": {
      "aws": {
        "expressions": {
          "region": {
            "constant_value": "us-east-1"
          }
        },
        "name": "aws"
      }
    },
    "root_module": {
      "resources": [
        {
          "address": "aws_s3_bucket.invalid",
          "expressions": {
            "acl": {
              "constant_value": "private"
            },
            "bucket": {
              "constant_value": "my-tf-test-bucket"
            },
            "tags": {
              "constant_value": {
                "Environment": "Dev",
                "Name": "My bucket"
              }
            }
          },
          "mode": "managed",
          "name": "invalid",
          "provider_config_key": "aws",
          "schema_version": 0,
          "type": "aws_s3_bucket"
        },
        {
          "address": "aws_vpc.invalid",
          "expressions": {
            "cidr_block": {
              "constant_value": "10.0.0.0/16"
            },
            "tags": {
              "constant_value": {
                "Name": "12345"
              }
            }
          },
          "mode": "managed",
          "name": "invalid",
          "provider_config_key": "aws",
          "schema_version": 1,
          "type": "aws_vpc"
        },
        {
          "address": "aws_vpc.untagged",
          "expressions": {
            "cidr_block": {
              "constant_value": "10.0.0.0/16"
            }
          },
          "mode": "managed",
          "name": "untagged",
          "provider_config_key": "aws",
          "schema_version": 1,
          "type": "aws_vpc"
        },
        {
          "address": "aws_vpc.valid",
          "expressions": {
            "cidr_block": {
              "constant_value": "10.0.0.0/16"
            },
            "tags": {
              "constant_value": {
                "Name": "123456"
              }
            }
          },
          "mode": "managed",
          "name": "valid",
          "provider_config_key": "aws",
          "schema_version": 1,
          "type": "aws_vpc"
        }
      ]
    }
  },
  "format_version": "0.1",
  "planned_values": {
    "root_module": {
      "resources": [
        {
          "address": "aws_s3_bucket.invalid",
          "mode": "managed",
          "name": "invalid",
          "provider_name": "registry.terraform.io/hashicorp/aws",
          "schema_version": 0,
          "type": "aws_s3_bucket",
          "values": {
            "acl": "private",
            "bucket": "my-tf-test-bucket",
            "bucket_prefix": null,
            "cors_rule": [],
            "force_destroy": false,
            "grant": [],
            "lifecycle_rule": [],
            "logging": [],
            "object_lock_configuration": [],
            "policy": null,
            "replication_configuration": [],
            "server_side_encryption_configuration": [],
            "tags": {
              "Environment": "Dev",
              "Name": "My bucket"
            },
            "tags_all": {
              "Environment": "Dev",
              "Name": "My bucket"
            },
            "website": []
          }
        },
        {
          "address": "aws_vpc.invalid",
          "mode": "managed",
          "name": "invalid",
          "provider_name": "registry.terraform.io/hashicorp/aws",
          "schema_version": 1,
          "type": "aws_vpc",
          "values": {
            "assign_generated_ipv6_cidr_block": false,
            "cidr_block": "10.0.0.0/16",
            "enable_dns_support": true,
            "instance_tenancy": "default",
            "tags": {
              "Name": "12345"
            },
            "tags_all": {
              "Name": "12345"
            }
          }
        },
        {
          "address": "aws_vpc.untagged",
          "mode": "managed",
          "name": "untagged",
          "provider_name": "registry.terraform.io/hashicorp/aws",
          "schema_version": 1,
          "type": "aws_vpc",
          "values": {
            "assign_generated_ipv6_cidr_block": false,
            "cidr_block": "10.0.0.0/16",
            "enable_dns_support": true,
            "instance_tenancy": "default",
            "tags": null
          }
        },
        {
          "address": "aws_vpc.valid",
          "mode": "managed",
          "name": "valid",
          "provider_name": "registry.terraform.io/hashicorp/aws",
          "schema_version": 1,
          "type": "aws_vpc",
          "values": {
            "assign_generated_ipv6_cidr_block": false,
            "cidr_block": "10.0.0.0/16",
            "enable_dns_support": true,
            "instance_tenancy": "default",
            "tags": {
              "Name": "123456"
            },
            "tags_all": {
              "Name": "123456"
            }
          }
        }
      ]
    }
  },
  "resource_changes": [
    {
      "address": "aws_s3_bucket.invalid",
      "change": {
        "actions": [
          "create"
        ],
        "after": {
          "acl": "private",
          "bucket": "my-tf-test-bucket",
          "bucket_prefix": null,
          "cors_rule": [],
          "force_destroy": false,
          "grant": [],
          "lifecycle_rule": [],
          "logging": [],
          "object_lock_configuration": [],
          "policy": null,
          "replication_configuration": [],
          "server_side_encryption_configuration": [],
          "tags": {
            "Environment": "Dev",
            "Name": "My bucket"
          },
          "tags_all": {
            "Environment": "Dev",
            "Name": "My bucket"
          },
          "website": []
        },
        "after_unknown": {
          "acceleration_status": true,
          "arn": true,
          "bucket_domain_name": true,
          "bucket_regional_domain_name": true,
          "cors_rule": [],
          "grant": [],
          "hosted_zone_id": true,
          "id": true,
          "lifecycle_rule": [],
          "logging": [],
          "object_lock_configuration": [],
          "region": true,
          "replication_configuration": [],
          "request_payer": true,
          "server_side_encryption_configuration": [],
          "tags": {},
          "tags_all": {},
          "versioning": true,
          "website": [],
          "website_domain": true,
          "website_endpoint": true
        },
        "before": null
      },
      "mode": "managed",
      "name": "invalid",
      "provider_name": "registry.terraform.io/hashicorp/aws",
      "type": "aws_s3_bucket"
    },
    {
      "address": "aws_vpc.invalid",
      "change": {
        "actions": [
          "create"
        ],
        "after": {
          "assign_generated_ipv6_cidr_block": false,
          "cidr_block": "10.0.0.0/16",
          "enable_dns_support": true,
          "instance_tenancy": "default",
          "tags": {
            "Name": "12345"
          },
          "tags_all": {
            "Name": "12345"
          }
        },
        "after_unknown": {
          "arn": true,
          "default_network_acl_id": true,
          "default_route_table_id": true,
          "default_security_group_id": true,
          "dhcp_options_id": true,
          "enable_classiclink": true,
          "enable_classiclink_dns_support": true,
          "enable_dns_hostnames": true,
          "id": true,
          "ipv6_association_id": true,
          "ipv6_cidr_block": true,
          "main_route_table_id": true,
          "owner_id": true,
          "tags": {},
          "tags_all": {}
        },
        "before": null
      },
      "mode": "managed",
      "name": "invalid",
      "provider_name": "registry.terraform.io/hashicorp/aws",
      "type": "aws_vpc"
    },
    {
      "address": "aws_vpc.untagged",
      "change": {
        "actions": [
          "create"
        ],
        "after": {
          "assign_generated_ipv6_cidr_block": false,
          "cidr_block": "10.0.0.0/16",
          "enable_dns_support": true,
          "instance_tenancy": "default",
          "tags": null
        },
        "after_unknown": {
          "arn": true,
          "default_network_acl_id": true,
          "default_route_table_id": true,
          "default_security_group_id": true,
          "dhcp_options_id": true,
          "enable_classiclink": true,
          "enable_classiclink_dns_support": true,
          "enable_dns_hostnames": true,
          "id": true,
          "ipv6_association_id": true,
          "ipv6_cidr_block": true,
          "main_route_table_id": true,
          "owner_id": true,
          "tags_all": true
        },
        "before": null
      },
      "mode": "managed",
      "name": "untagged",
      "provider_name": "registry.terraform.io/hashicorp/aws",
      "type": "aws_vpc"
    },
    {
      "address": "aws_vpc.valid",
      "change": {
        "actions": [
          "create"
        ],
        "after": {
          "assign_generated_ipv6_cidr_block": false,
          "cidr_block": "10.0.0.0/16",
          "enable_dns_support": true,
          "instance_tenancy": "default",
          "tags": {
            "Name": "123456"
          },
          "tags_all": {
            "Name": "123456"
          }
        },
        "after_unknown": {
          "arn": true,
          "default_network_acl_id": true,
          "default_route_table_id": true,
          "default_security_group_id": true,
          "dhcp_options_id": true,
          "enable_classiclink": true,
          "enable_classiclink_dns_support": true,
          "enable_dns_hostnames": true,
          "id": true,
          "ipv6_association_id": true,
          "ipv6_cidr_block": true,
          "main_route_table_id": true,
          "owner_id": true,
          "tags": {},
          "tags_all": {}
        },
        "before": null
      },
      "mode": "managed",
      "name": "valid",
      "provider_name": "registry.terraform.io/hashicorp/aws",
      "type": "aws_vpc"
    }
  ],
  "terraform_version": "0.13.5"
}

